<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="Dennis Sigel">
   <META NAME="COPYRIGHT" CONTENT="Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.">
   <meta name="GENERATOR" content="Mozilla/4.5 [en] (X11; I; SunOS 5.7 sun4u) [Netscape]">
</head>
<body>

<h3>Basic Renderable Example:</h3>

<p>
<strong>Demo</strong><br>
The simple renderable demo on the following page consists of a
large source image, small image panning window, button to
perform the scale and invert operation, and the resultant
destination image.  Pressing the
"Invert/Scale" button will shrink the source image and invert
its color components.
</p>

<p>
<strong>JAI</strong><br>
This demo utilizes the<br>
<pre>
<code>JAI.createRenderable()</code>
<code>JAI.createScaledRendering()</code>
</pre>
methods to perform the scale and invert imaging operations.
</p>

<p>
The "Invert" operation inverts the pixel values of an image.
For source images with signed data types, the pixel values of the
destination image are defined by the pseudocode:
</p>

<pre><code>dst[x][y][b] = -src[x][y][b]</code></pre>

<p>
For unsigned data types, the destination values are defined by:

<pre><code>dst[x][y][b] = MAX_VALUE - src[x][y][b]</code></pre>

where <code>MAX_VALUE</code> is the maximum value supported by the
system of the data type of the source pixel.
</p>

<p>
<strong>Theory</strong><br>
The renderable API architecture integrates a model of
rendering independence with a parallel, device-dependent
(rendered) model.  The rendering-independent portion of
the architecture is a superset of the traditional model
of device-dependent imaging.
</p>

<p>
The renderable layer provides image sources that can be
reused multiple times in different contexts, such as screen
display or printing.  The renderable operators take
rendering-independent parameters and can be chained
together (operation chains) to form directed-acyclic-graphs(DAGS).
Any class implementing the RenderableImage interface is
a renderable source and must adapt to RenderContexts.
Renderable images are referenced through user-defined
coordinate systems.
</p>

</body>
</html>
